import { Card, Table, Button } from 'antd';

type Row = { id: string; name: string; students: number };

const data: Row[] = [
  { id: 'c-1', name: '软件工程', students: 56 },
  { id: 'c-2', name: '编译原理', students: 42 },
];

export default function TeacherCourses() {
  return (
    <Card title="课程管理">
      <Table<Row>
        rowKey="id"
        dataSource={data}
        columns={[
          { title: '课程名称', dataIndex: 'name' },
          { title: '学生人数', dataIndex: 'students' },
          { title: '操作', render: () => <Button type="link">查看</Button> },
        ]}
        pagination={false}
      />
    </Card>
  );
}


